<script type="text/javascript">
	function siteChange() {
		$('#user-table').datagrid({
			url : 'app/user'
		});
		$('#user-table').datagrid('load', {
			siteId : $('input[name="site-id"]').val()
		});
	}
</script>
<div id="user-tb" style="padding: 5px; height: auto">
	<div style="margin-bottom: 5px">
		<input class="easyui-combobox" name="site-id"
			data-options="valueField:'id',textField:'name',url:'app/site',onSelect:siteChange">
		<a href="#" class="easyui-linkbutton" iconCls="icon-add"
			onclick="onAdd('user')">新增</a>
	</div>
</div>
<table id="user-table" class="easyui-datagrid"
	data-options="rownumbers:true,singleSelect:true,fitColumns:true,pagination:true,pageSize:10,toolbar:'#user-tb',loadFilter:pagerFilter">
	<thead>
		<tr>
			<th data-options="field:'name',width:50">用户名</th>
			<th data-options="field:'password',width:100">密码</th>
			<th data-options="field:'email',width:50">邮箱</th>
			<th
				data-options="field:'id',formatter:userBtn,width:50,align:'center'">操作</th>
		</tr>
	</thead>
</table>

